package com.itheima.restkeeper.face;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.restkeeper.CategoryFace;
import com.itheima.restkeeper.req.CategoryVo;
import com.itheima.restkeeper.service.ICategoryService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Method;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @ClassName CategoryFaceImpl.java
 * @Description 菜品分类dubbo服务接口实现
 */
@Slf4j
@DubboService(version = "${dubbo.application.version}",timeout = 5000,
    methods ={
        @Method(name = "findCategoryVoPage",retries = 2),
        @Method(name = "createCategory",retries = 0),
        @Method(name = "updateCategory",retries = 0),
        @Method(name = "deleteCategory",retries = 0)
    })
public class CategoryFaceImpl implements CategoryFace {

    @Autowired
    ICategoryService categoryService;

    @Override
    public Page<CategoryVo> findCategoryVoPage(CategoryVo categoryVo, int pageNum, int pageSize) {
        //查询Page<Category>分类分页
        //转换Page<Category>为Page<CategoryVo>
        //转换List<Category>为List<CategoryVo>
        //返回分页结果
        return null;
    }

    @Override
    public CategoryVo createCategory(CategoryVo categoryVo) {
        return null;
    }

    @Override
    public Boolean updateCategory(CategoryVo categoryVo) {
        return null;
    }

    @Override
    public Boolean deleteCategory(String[] checkedIds) {
        return null;
    }

    @Override
    public CategoryVo findCategoryByCategoryId(Long categoryId) {
        return null;
    }

    @Override
    public List<CategoryVo> findCategoryVoList() {
        return null;
    }
}
